<?php
/**
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */

$cakeDescription = __d('cake_dev', 'Necessito');

?>
<!DOCTYPE html>
<html>
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $cakeDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('cake.generic');
		echo $this->Html->css('estilo');

  		echo $this->Html->script('jquery110');
  		echo $this->Html->script('tiny_mce/tiny_mce');
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');

		echo $this->Html->css('bootstrap.css');
  		echo $this->Html->css('dt/DT_bootstrap.css');

		echo $this->Html->css('plugins/font-awesome/css/font-awesome.min.css');
		echo $this->Html->css('bootstrap.css.map');
		echo $this->Html->css('jquery.ui.theme');
		echo $this->Html->css('jquery.ui.tooltip');

		echo $this->Html->script('jquery-1.11.0');
		echo $this->Html->script('jquery-ui-1.10.4.custom.min');
		echo $this->Html->script('jquery.maskedinput-1.3');
		echo $this->Html->script('jquery.ui.tooltip');
		echo $this->Html->script('jquery.ui.position');
		echo $this->Html->script('jquery.ui.widget');
		echo $this->Html->script('jquery.validate');
		echo $this->Html->script('bootstrap.min');
		echo $this->Html->script('jquery.dataTables.min');
	?>
</head>
<body>
	<div class="col-occurrence" class="img-responsive" alt="Responsive image">
    <?php echo $this->html->image('logo_necessito.png'); ?>
    </div>		
		
	<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  		<div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    	<div class="navbar-header">
      		<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button><a class="navbar-brand" href="/necessito/">Home</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="/necessito/servicos/">Serviços</a></li>
        <li><a href="/necessito/users/login">Junte-se a nós</a></li>
        <?php if ($this->Session->check('Auth.User')){ ?>
          <li><?php echo $this->Html->link('Meus Serviços', array('controller' => 'servicos', 'action' => 'meus_servicos'), array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link('Perfil', array('controller' => 'users', 'action' => 'perfil'), array('escape' => false)); ?></li>
        <?php } ?>
        <!-- <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li class="divider"></li>
            <li><a href="#">Separated link</a></li>
            <li class="divider"></li>
            <li><a href="#">One more separated link</a></li>
          </ul>
        </li> -->
      </ul>
      <!-- <form class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">Pesquisar</button>
      </form> -->

      <ul class="nav navbar-nav navbar-right">
   		<li class="dropdown">
   			<?php
   			if ($this->Session->check('Auth.User')){
     			$user1 = $this->Session->read('Auth'); 
     			echo $this->Html->link('Sair', array('controller' => 'Users', 'action' => 'logout'));
 			} else {
 	    		echo $this->Html->link('Entrar', array('controller' => 'Users', 'action' => 'login'));
 			}
 			?>
 		</li>
</ul>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>


<div id="content">

			<?php echo $this->Session->flash(); ?>

			<?php echo $this->fetch('content'); ?>
		</div>




		<div id="footer">
			<?php //echo $this->Html->imagem('footer.png'); ?>
		</div>
</body>
</html>
